<template>
	<view class="content">
		<u-navbar title="充值记录" :border-bottom="false" back-icon-color="#ffffff" title-color="#fff" :background="{backgroundColor:'#2A2931'}"></u-navbar>
		<view class="list">
			<view class="item" v-for="item in loglist" :key="item.time">
				<view class="middle">
					<view class="label flex-c flex-bt">
						<text>充值金额</text>
						<view class="top flex">
							<view class="time">{{item.time}}</view>
							<view class="state">{{item.state}}</view>
						</view>
					</view>
					<view class="money">{{item.price}}</view>
				</view>
				<view class="foot">{{item.msg}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				loglist: [],
				page:0
			}
		},
		onLoad() {
			this.getlog()
		},
		methods: {
			async getlog(){
				const { data: res } = await this.$Request({
					url:'api/User/volleyDesc',
					data:{
						user_id: this.$store.state.userid,
						pagecount: 10,
						pagesize: 10,
						page: this.page
					}
				})
				this.loglist = this.loglist.concat(res.result)
			}
		},
		onReachBottom(){
			this.page++
			this.getlog()
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		background: #2A2931;
		min-height: 100vh;
		.list{
			width: 100%;
			.item{
				margin: 0rpx 20rpx;
				padding: 14rpx;
				background: #31303a;
				margin-top:20rpx;
				font-size:28rpx;
				.middle{
					padding: 10rpx 0;
					.label{
						font-size: 24rpx;
						color: #ccc;
						line-height: 50rpx;
					}
					.money{
						font-size: 70rpx;
						color: rgb(213, 157, 81);
						font-weight: 600;
					}
				}
				.foot{
					line-height: 70rpx;
					border-top: 2rpx solid #4d4b5a;
					color: #ccc;
				}
			}
		}
	}
</style>
